------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/tg2778/Dropbox/0_Reviews_RnRs/072022_JOP_Roads/v3_JOP/Replication - Roads/4_Log/9_IVResults.log
  log type:  text
 opened on:  20 Jan 2023, 16:03:08

. 
. use "1_Data/AC_pre-delim_dataset.dta", clear
(Written by R.              )

. 
. egen acstateid = concat(VD01_AC_id stateid),p("_")

. 
. label var totalvillconn "Δ Connectivity"

. label var percenteligiblevillage500 "Eligibility Instrument"

. 
. quietly: xi: ivreg2 change_incumbentvoteshare (totalvillconn = percenteligiblevillage500) i.statedistrict2, partial(i.statedistrict2) cluster(
> acstateid) first savefirst savefprefix(ac1)

. quietly: estimates store aciv1, title(1)

. quietly: estadd local fe "District"

. quietly: estadd local cl "Constituency"

. 
. quietly: xi: ivreg2 change_incumbentvoteshare (totalvillconn = percenteligiblevillage500) i.statedistrict2, partial(i.statedistrict2) cluster(
> statedistrict2) first savefirst savefprefix(ac2)

. quietly: estimates store aciv2, title(2)

. quietly: estadd local fe "District"

. quietly: estadd local cl "District"

. 
. 
. **********************************
. *******PRE DELIMITATION PC********
. **********************************
. 
. use "1_Data/PC_pre-delim_dataset_select.dta", clear
(Written by R.              )

. 
. egen pcstate = concat(PC_no_2001 stateid),p("_")

. 
. label var totalvillconn "Δ Connectivity"

. label var percenteligiblevillage500 "Eligibility Instrument"

. 
. quietly: xi: ivreg2 change_incumbentvoteshare (totalvillconn = percenteligiblevillage500) i.state2, partial(i.state2) cluster(pcstate) first s
> avefirst savefprefix(pc1)

. quietly: estimates store pciv1, title(3)

. quietly: estadd local fe "State"

. quietly: estadd local cl "Constituency"

. 
. quietly: xi: ivreg2 change_incumbentvoteshare (totalvillconn = percenteligiblevillage500) i.state2, partial(i.state2) cluster(state2) first sa
> vefirst savefprefix(pc2)

. quietly: estimates store pciv2, title(4)

. quietly: estadd local fe "State"

. quietly: estadd local cl "State"

. 
. 
. 
. ****************************************************************************************
. 
. *cd "2_Tables"
. 
. esttab aciv* pciv* using "2_Tables/Manuscript_Table2_IV.doc", replace label cells(b(star fmt(3)) se(par fmt(3))) scalars("widstat F-stat" "N N
> " "fe Fixed Effects" "cl Cluster SE")sfmt("%9.2f" "%9.0f") nomtitles mgroups("State elections" "National elections", pattern(1 0 1 0)) title(I
> V Results: Roads provision does not increase ruling party(s) voteshare) rtf collabels(none) varlabels(totalvillconn "Δ Connectivity")
(output written to 2_Tables/Manuscript_Table2_IV.doc)

. 
. esttab ac1* ac2* pc1* pc2* using "2_Tables/Manuscript_Table2_IV.doc", append label cells(b(star fmt(3)) se(par fmt(3))) nomtitles nonumbers rt
> f collabels(none) noobs
(output written to 2_Tables/Manuscript_Table2_IV.doc)

. log close
      name:  <unnamed>
       log:  /Users/tg2778/Dropbox/0_Reviews_RnRs/072022_JOP_Roads/v3_JOP/Replication - Roads/4_Log/9_IVResults.log
  log type:  text
 closed on:  20 Jan 2023, 16:03:11
------------------------------------------------------------------------------------------------------------------------------------------------
